<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <title>HHadmin - 登录</title>
    <link rel="shortcut icon" href="${ctxPath}/static/favicon.ico">
    <link href="${ctxPath}/${pluginPath}/bootstrap/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${ctxPath}/${pluginPath}/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="${ctxPath}/${cssPath}/animate.css" rel="stylesheet">
    <link href="${ctxPath}/${cssPath}/style.css?v=4.1.0" rel="stylesheet">
    
    <script>
    if (window.top !== window.self) {
        window.top.location = window.location;
    }
    </script>
</head>
<body class="gray-bg">
	<div class="middle-box text-center loginscreen  animated fadeInDown">
	    <div>
	        <div>
	            <h1 class="logo-name">HH</h1>	
	        </div>
	        <h3>欢迎使用HHadmin</h3>
	        <div>
	        	<h4 style="color: red;">${errorMsg!}</h4>
	        </div>
	        <form class="m-t" role="form" action="${ctxPath}/login" method="post">
	            <div class="form-group">
	                <input type="text" name="username" class="form-control" placeholder="用户名" required>
	            </div>
	            <div class="form-group">
	                <input type="password" name="password" class="form-control" placeholder="密码" required>
	            </div>
	            @if(captchaOpen){
	            <div class="form-group" style="float: left;">
	                <div class="col-sm-8" style="padding-left: 0px; padding-right: 0px;">
	                    <input class="form-control" type="text" name="captcha" placeholder="验证码" required>
	                </div>
	                <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;">
	                    <img src="${ctxPath}/captcha" id="captcha" width="100%" height="100%"/>
	                </div>
	            </div>
	            @} 
	            <button type="submit" class="btn btn-primary block full-width m-b">登 录</button>
	        </form>
	    </div>
	</div>
	<script src="${ctxPath}/${jsPath}/jquery.min.js?v=2.1.4"></script>
	<script src="${ctxPath}/${pluginPath}/bootstrap/bootstrap.min.js?v=3.3.6"></script>
	<script>
		$(function(){
			$('#captcha').click(function(){
				$("#captcha").attr('src', '${ctxPath}/captcha?' + Math.floor(Math.random() * 100)).fadeIn();
			})
		})
	</script>
</body>
</html>